// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SearchRuleInfo.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Defines the SearchRuleInfo type.
//   Note: This is based on the SSPC (codeplex).
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.Saf.Actions.Moss.Entities
{
    using System;
    using System.Xml.Serialization;

    using Microsoft.Office.Server.Search.Administration;

    using SharePoint.Wss.Entities;

    using Spring.Objects;
    using Collaboris.SharePoint.Moss.Search;

    /// <summary>
    /// Used to contain a SearchRuleInformation.
    /// </summary>
    [Serializable]
    public class SearchRuleInfo : WSSEntityBase
    {
        private SearchRuleType ruleType;
        private ScopeRuleFilterBehavior filterBehavior;
        private string propertyName;
        private string propertyValue;
        private string matchingString;
        private UrlScopeRuleType urlRuleType;

        [XmlAttribute]
        public SearchRuleType RuleType
        {
            get { return ruleType; }
            set { ruleType = value; }
        }

        [XmlAttribute]
        public ScopeRuleFilterBehavior FilterBehavior
        {
            get { return filterBehavior; }
            set { filterBehavior = value; }
        }

        [XmlAttribute]
        public string PropertyName
        {
            get { return propertyName; }
            set { propertyName = value; }
        }

        [XmlAttribute]
        public string PropertyValue
        {
            get { return propertyValue; }
            set { propertyValue = value; }
        }

        [XmlAttribute]
        public string MatchingString
        {
            get { return matchingString; }
            set { matchingString = value; }
        }

        [XmlAttribute]
        public UrlScopeRuleType UrlRuleType
        {
            get { return urlRuleType; }
            set { urlRuleType = value; }
        }
    }
}